package com.sms.riskservice.service;

import com.sms.common.result.Result;

public interface SmsRiskService {
    
    /**
     * 检查手机号是否在黑名单中
     */
    boolean isInBlacklist(String phoneNumber);
    
    /**
     * 检查发送频率是否超限
     */
    boolean isRateLimitExceeded(String phoneNumber);
    
    /**
     * 检查用户是否被拦截
     */
    boolean isUserBlocked(String phoneNumber);
    
    /**
     * 检查用户位置是否异常
     */
    boolean isLocationSuspicious(String phoneNumber);
    
    /**
     * 添加黑名单
     */
    Result<String> addToBlacklist(String phoneNumber, Long userId, Integer blacklistType, String reason, Long operatorId);
    
    /**
     * 移除黑名单
     */
    Result<String> removeFromBlacklist(String phoneNumber, Long operatorId);
    
    /**
     * 添加白名单
     */
    Result<String> addToWhitelist(String phoneNumber, Long userId, Integer whitelistType, String reason, Long operatorId);
    
    /**
     * 移除白名单
     */
    Result<String> removeFromWhitelist(String phoneNumber, Long operatorId);
    
    /**
     * 更新用户位置信息
     */
    Result<String> updateUserLocation(String phoneNumber, String province, String city, String district, 
                                    String address, Double longitude, Double latitude, String ipAddress);
} 